package icasue.tools.sqlhelper.test.mapping.queries.index;

import icasue.tools.sqlhelper.annotation.Index;
import icasue.tools.sqlhelper.annotation.IndexG;
import icasue.tools.sqlhelper.annotation.Primary;
import icasue.tools.sqlhelper.annotation.Unique;

import java.time.LocalDateTime;
import java.util.Collections;
import java.util.Date;
import java.util.List;

/**
 * @Author: Qiao Hang
 * @CreateDate: 2021/9/27 下午4:41
 * @UpdateDate:
 * @Description:
 */
@IndexG(value = {"User_index1_(Auto)_", "User_index2_(Auto)_"},weight = 0.5f)
@IndexG(value = {"User_index1_(Auto)_", "User_index3_(Auto)_"},weight = 0.8f)
@IndexG(value = {"User_index2_(Auto)_", "User_index6_(Auto)_", "Person_sex_(Auto)_"},weight = 0.0f)
@IndexG(value = {"User_index2_(Auto)_", "User_index6_(Auto)_"},weight = 0.4f)
@IndexG(value = {"User_index6_(Auto)_", "Person_sex_(Auto)_", "User_index1_(Auto)_"}, weight = 0.8f)
public class User extends Person {

    @Primary
    @ColMapping(column = "_identity_(3.0f)_")
    private Integer identity;

    @Primary
    @ColMapping(column = "User_userId_(3.0f)_")
    private Integer userId;

    @Unique
    @ColMapping(column = "User_username_(2.0f)_")
    private String username;

    @Unique
    @ColMapping(column = "User_passWord_(2.0f)_")
    private String passWord;

    @ColMapping(column = "User_index1_(Auto)_")
    private Integer index1;

    @ColMapping(column = "User_index2_(Auto)_")
    private Integer index2;

    @ColMapping(column = "User_index3_(Auto)_")
    private Integer index3;

    @ColMapping(column = "User_index4_(NO)_")
    private Integer index4;

    @ColMapping(column = "User_index5_(NO)_")
    private Integer index5;

    @ColMapping(column = "User_index6_(Auto)_")
    private Integer index6;

    @Index(weight = 0.5f)
    @ColMapping(column = "User_index7_(0.5f)_")
    private Integer index7;

    @Index(weight = 0.6f)
    @ColMapping(column = "User_index8_(0.6f)_")
    private Integer index8;

    @ColMapping(column = "User_index9_(NO)_")
    private Integer index9;

    @ColMapping(column = "User_index10_(NO)_")
    private Integer index10;

    @Index(weight = 0.01f)
    @ColMapping(column = "User_index11_(0.01f)_")
    private Integer index11;

    @Index(weight = 0.0f)
    @ColMapping(column = "User_index12_(0.0f)_")
    private Integer index12;

    @ColMapping(column = "date_time")
    private Date dateTime;

    @ColMapping(column = "local_time")
    private LocalDateTime localTime;

    private List<String> hobby = Collections.EMPTY_LIST;

    public User(){

    }

    public User(Integer userId,String username,String passWord,List<String> hobby,String sex, Double age, Boolean isAnimal){
        super(sex,age,isAnimal);
        this.userId = userId;
        this.username = username;
        this.passWord = passWord;
        this.hobby = hobby;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public Integer getIndex1() {
        return index1;
    }

    public void setIndex1(Integer index1) {
        this.index1 = index1;
    }

    public Integer getIndex2() {
        return index2;
    }

    public void setIndex2(Integer index2) {
        this.index2 = index2;
    }

    public Integer getIndex3() {
        return index3;
    }

    public void setIndex3(Integer index3) {
        this.index3 = index3;
    }

    public Integer getIndex4() {
        return index4;
    }

    public void setIndex4(Integer index4) {
        this.index4 = index4;
    }

    public Integer getIndex5() {
        return index5;
    }

    public void setIndex5(Integer index5) {
        this.index5 = index5;
    }

    public Integer getIndex6() {
        return index6;
    }

    public void setIndex6(Integer index6) {
        this.index6 = index6;
    }

    public Integer getIndex7() {
        return index7;
    }

    public void setIndex7(Integer index7) {
        this.index7 = index7;
    }

    public Integer getIndex8() {
        return index8;
    }

    public void setIndex8(Integer index8) {
        this.index8 = index8;
    }

    public Integer getIndex9() {
        return index9;
    }

    public void setIndex9(Integer index9) {
        this.index9 = index9;
    }

    public Integer getIndex10() {
        return index10;
    }

    public void setIndex10(Integer index10) {
        this.index10 = index10;
    }

    public List<String> getHobby() {
        return hobby;
    }

    public void setHobby(List<String> hobby) {
        this.hobby = hobby;
    }

    public Integer getIdentity() {
        return identity;
    }

    public void setIdentity(Integer identity) {
        this.identity = identity;
    }

    public Integer getIndex11() {
        return index11;
    }

    public void setIndex11(Integer index11) {
        this.index11 = index11;
    }

    public Integer getIndex12() {
        return index12;
    }

    public void setIndex12(Integer index12) {
        this.index12 = index12;
    }

    public Date getDateTime() {
        return dateTime;
    }

    public void setDateTime(Date dateTime) {
        this.dateTime = dateTime;
    }

    public LocalDateTime getLocalTime() {
        return localTime;
    }

    public void setLocalTime(LocalDateTime localTime) {
        this.localTime = localTime;
    }
}
